MOD = 10 ** 9 + 7


class Solution:
    def countGoodNumbers(self, n: int) -> int:
        if n % 2 == 0:
            n0 = n1 = n // 2
        else:
            n0 = n // 2 + 1
            n1 = n // 2

        return (pow(5, n0, MOD) * pow(4, n1, MOD)) % MOD


if __name__ == "__main__":
    print(Solution().countGoodNumbers(1))  # 5
    print(Solution().countGoodNumbers(4))  # 400
    print(Solution().countGoodNumbers(50))  # 564908303
